<?php
$path = base_path() . drupal_get_path('theme', 'nobel') . '/';
global $base_url;
?>
<!--header-->
<header class="header-main" id="top">
  <nav class="navsticky js-navsticky">
    <div class="container">
      <div class="mod mod-nav-sticky-panel" data-connectors="navsticky,greybox,overlay">
        <div class="wrapper">
          <a href="<?= url() ?>" class="b"><img src="<?= $path ?>images/nobel_logo_header.png" class="logo" alt="logo"></a>
          <span class="menu js-menu icon-menu"></span>
        </div>
      </div>
      <ul class="navmenu">
        <li class="nav-entry">
          <div class="mod mod-countrypicker" data-redirect="true" data-connectors="overlay">
            <input id="utmcodes" data-utmcode="" value="" type="hidden">
            <a class="headeritem" href="#" title="International site">
              <i class="flag-icon flag-icon-international"></i>
              <span class="js-flag-title is-hidden">国际站</span>
              国际站
            </a>
            <div class="morph-bg">
              <div class="morph-content js-content">
                <span class="glyphicon glyphicon-remove icon-close"></span>
                <h3 class="b">欢迎来到诺保科</h3>
                <p class="rich">
                  请选择您所在的地区/国家，如果找不到，请点击
                  <a class="b active" data-code="international/en" href="https://www.nobelbiocare.com/international/en/home.html">英文站</a>
                </p>
                <ul class="country-container clearfix">
                  <div class="column">
                    <li class="area">
                      <h4 class="b">Americas</h4>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="ca/en" href="https://www.nobelbiocare.com/ca/en/home.html">
                        <i class="flag-icon flag-icon-ca"></i>Canada (EN)
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="ca/fr" href="https://www.nobelbiocare.com/ca/fr/home.html">
                        <i class="flag-icon flag-icon-ca"></i>Canada (FR)
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="mx/es" href="https://www.nobelbiocare.com/mx/es/home.html">
                        <i class="flag-icon flag-icon-mx"></i>Mexico
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="us/en" href="https://www.nobelbiocare.com/us/en/home.html">
                        <i class="flag-icon flag-icon-us"></i>United States
                      </a>
                    </li>
                    <li class="area">
                      <h4 class="b">Asia Pacific</h4>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="au/en" href="https://www.nobelbiocare.com/au/en/home.html">
                        <i class="flag-icon flag-icon-au"></i>Australia
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="hk/en" href="https://www.nobelbiocare.com/hk/en/home.html">
                        <i class="flag-icon flag-icon-hk"></i>Hong Kong
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="in/en" href="https://www.nobelbiocare.com/in/en/home.html">
                        <i class="flag-icon flag-icon-in"></i>India
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="jp/ja"
                         href="https://www.nobelbiocare.com/jp/ja/%E3%83%9B%E3%83%BC%E3%83%A0.html">
                        <i class="flag-icon flag-icon-jp"></i>日本
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="nz/en" href="https://www.nobelbiocare.com/nz/en/home.html">
                        <i class="flag-icon flag-icon-nz"></i>New Zealand
                      </a>
                    </li>
                    <li class="area">
                      <h4 class="b">EMEA</h4>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="be/en" href="https://www.nobelbiocare.com/be/en/home.html">
                        <i class="flag-icon flag-icon-be"></i>Belgium
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="be/fr" href="https://www.nobelbiocare.com/be/fr/home.html">
                        <i class="flag-icon flag-icon-be"></i>Belgique
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="de/de" href="https://www.nobelbiocare.com/de/de/home.html">
                        <i class="flag-icon flag-icon-de"></i>Deutschland
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="dk/en" href="https://www.nobelbiocare.com/dk/en/home.html">
                        <i class="flag-icon flag-icon-dk"></i>Denmark
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="es/es" href="https://www.nobelbiocare.com/es/es/home.html">
                        <i class="flag-icon flag-icon-es"></i>España
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="fr/fr" href="https://www.nobelbiocare.com/fr/fr/home.html">
                        <i class="flag-icon flag-icon-fr"></i>France
                      </a>
                    </li>
                  </div>
                  <div class="column">
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="fi/en" href="https://www.nobelbiocare.com/fi/en/home.html">
                        <i class="flag-icon flag-icon-fi"></i>Finland
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="hu/en" href="https://www.nobelbiocare.com/hu/en/home.html">
                        <i class="flag-icon flag-icon-hu"></i>Hungary
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="ie/en" href="https://www.nobelbiocare.com/ie/en/home.html">
                        <i class="flag-icon flag-icon-ie"></i>Ireland
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="it/it" href="https://www.nobelbiocare.com/it/it/home.html">
                        <i class="flag-icon flag-icon-it"></i>Italia
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="nl/en" href="https://www.nobelbiocare.com/nl/en/home.html">
                        <i class="flag-icon flag-icon-nl"></i>Netherlands
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="no/en" href="https://www.nobelbiocare.com/no/en/home.html">
                        <i class="flag-icon flag-icon-no"></i>Norway
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="at/de" href="https://www.nobelbiocare.com/at/de/home.html">
                        <i class="flag-icon flag-icon-at"></i>Österreich
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="pt/pt" href="https://www.nobelbiocare.com/pt/pt/home.html">
                        <i class="flag-icon flag-icon-pt"></i>Portugal
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="ru/ru" href="https://www.nobelbiocare.com/ru/ru/home.html">
                        <i class="flag-icon flag-icon-ru"></i>Россия
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="se/en" href="https://www.nobelbiocare.com/se/en/home.html">
                        <i class="flag-icon flag-icon-se"></i>Sweden
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="ch/de" href="https://www.nobelbiocare.com/ch/de/home.html">
                        <i class="flag-icon flag-icon-ch"></i>Schweiz
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="ch/fr" href="https://www.nobelbiocare.com/ch/fr/home.html">
                        <i class="flag-icon flag-icon-ch"></i>Suisse
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="ch/it" href="https://www.nobelbiocare.com/ch/it/home.html">
                        <i class="flag-icon flag-icon-ch"></i>Svizzera
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="uk/en" href="https://www.nobelbiocare.com/uk/en/home.html">
                        <i class="flag-icon flag-icon-uk"></i>United Kingdom
                      </a>
                    </li>
                    <li class="country">
                      <a class="b-secondary " data-use-intl="false" data-code="za/en" href="https://www.nobelbiocare.com/za/en/home.html">
                        <i class="flag-icon flag-icon-za"></i>South Africa
                      </a>
                    </li>
                  </div>
                </ul>
              </div>
            </div>
          </div>
        </li>
        <li class="nav-entry">
          <a class="headeritem" href="<?= url('company/contact-us') ?>">
            <span class="title">联系我们</span>
          </a>
        </li>
       
        <li class="nav-entry">
          <?php if (user_is_logged_in()) { ?>
            <a class="headeritem" href="<?= url('user/logout') ?>">
              <span class="title">退出</span>
            </a>
          <?php }
          else { ?>

            <?php $form = drupal_build_form('user_login', user_login(array(), $form_state)); ?>

            <section class="mod mod-signin">
              <div class="js-ajaxload">
                <a class="headeritem"
                   href="<?= !empty(request_path()) && request_path() != 'user/register' && request_path() != 'user/login' ? url('user/login', array('query' => array('destination' => request_path()))) : url('user/login') ?>">登录<span
                    class="arrow-down"></span></a>
                <div class="headercontent" style="width:599px;">

                  <form action="<?= url('user/login') ?>" method="post" id="user-login" accept-charset="UTF-8" novalidate="novalidate">
                    <?= drupal_render($form['form_build_id']) ?>
                    <?= drupal_render($form['form_id']) ?>

                    <fieldset class="clearfix first">
                      <legend>
                        请登录<span class="close-icn js-close">x</span>
                      </legend>
                      <p>手机号码 *</p>
                      <input class="required input-text valid" value="" type="text" name="name" id="name" data-com.agilebits.onepassword.user-edited="yes"
                             aria-invalid="false">
                      <p>
                        密码 *
                        <a tabindex="15" class="b-secondary forgot-link" href="<?= url('user/password') ?>">
                          忘记密码
                        </a>
                      </p>
                      <input class="required input-text valid" value="" type="password" name="pass" id="password" autocomplete="off"
                             data-com.agilebits.onepassword.user-edited="yes" aria-invalid="false">
                      <input style="height: auto" name="persistent_login" id="edit-persistent-login--2" title="Keep me signed in" type="checkbox">
                      <label for="persistent-login--2"><span class="sprites"></span>记住我</label>

                      <button tabindex="14" class="b js-signin colored" type="submit">登录</button>
                    </fieldset>
                    <fieldset class="clearfix last">
                      <legend class="small">创建你的账户</legend>
                      <a tabindex="16" class="button"
                         href="<?= !empty(request_path()) && request_path() != 'user/register' && request_path() != 'user/login' ? url('user/register', array('query' => array('destination' => request_path()))) : url('user/register') ?>">
                        注册
                      </a>
                      <p>
                      </p>
                    </fieldset>
                  </form>
                </div>
              </div>
            </section>
          <?php } ?>
        </li>
      </ul>
    </div>
  </nav>
  <nav class="navmain container clearfix">
    <div class="mod mod-nav-main js-mod-nav-main" data-connectors="navsticky">
      <a href="<?= url() ?>" class="js-logo logo"><img src="<?= $path ?>images/nobel_logo_header.png"/>
      </a>
      <ul class="main">
        <?php
        if ($main_menu) {
          foreach ($main_menu as $key => $menu) { ?>
            <li class="<?= '/' . request_path() == url($menu['link']['href']) ? 'active' : '' ?>">
              <a href="<?= url($menu['link']['href']); ?>" title="" class="b-secondary">
                <h5 class="b"><?php print $menu['link']['link_title'] ?> </h5>
              </a>
            </li>
            <?php
          }
        } ?>
      </ul>
    </div>
    <div class="mod mod-search-button">
      <a href="javascript:;" class="b-secondary js-search-link"></a>
    </div>
  </nav>
  <nav class="navmobile">
    <ul class="navmenu">
      <li class="nav-entry hamburger-menu">
        <a class="nav-hamburger" href="#nav-offscreen" id="nav-hamburger">
          <div class="hamburger-icon">
            <span></span>
            <span></span>
            <span></span>
            <span></span>
          </div>
        </a>
      </li>
      <li class="nav-entry search-button">
        <div class="mod mod-search-button" data-connectors="search,overlay,greybox">
          <a href="javascript:;" class="b-secondary js-search-link"></a>
        </div>
      </li>
      <li class="nav-entry main-logo">
        <a href="<?= url('/') ?>" class="b">
          <img src="<?= $path ?>images/nobel_logo_header.png" alt="Logo of Nobel-Biocare" class="logo">
        </a>
      </li>
      <!--<li class="nav-entry">
          <a class="headeritem" href="<?= url('company/contact-us') ?>">
            <span class="title">联系我们</span>
          </a>
        </li>-->
      <li class="nav-entry phone-signin">
          <?php if (user_is_logged_in()) { ?>
            <a class="headeritem" href="<?= url('user/logout') ?>">
              退出
            </a>
          <?php }
          else { ?>
            <a class="headeritem" href="<?= url('user/login') ?>">
              登录
            </a>
          <?php } ?>
      </li>
    </ul>
  </nav>
</header>

<!--搜索BOX start-->
<?= theme_search_box() ?>
<!--搜索BOX end-->

<div class="mod mod-search-result skin-search-result-web" data-overlay="1" data-limit="10">

</div>

<!--搜索 end-->


<!--手机端导航-->
<nav id="nav-offscreen" class="mod mod-nav-offscreen js-mod-nav-offscreen">
  <ul>
    <?php if ($main_menu) {
      foreach ($main_menu as $key => $menu) {
        if ($menu['link']['hidden'] != 1) {
          ?>
          <li>
            <a href="<?php print url($menu['link']['href'], $menu['link']['localized_options']) ?>" <?= !empty($menu['below']) ? "class='b-secondary'" : '' ?>>
              <p class="b"><i class="<?= get_ico($menu['link']['href']) ?>"></i><?php print $menu['link']['link_title'] ?></p>
            </a>
            <?php if (!empty($menu['below'])) { ?>
              <ul>
                <?php foreach ($menu['below'] as $belowMenu) {
                  if ($belowMenu['link']['hidden'] != 1) { ?>
                    <li>
                      <a
                        href="<?= $belowMenu['link']['href'] == 'education/spf-overview' ? url('education') . '#education-course' : url($belowMenu['link']['href'], $belowMenu['link']['localized_options']) ?>" <?= !empty($belowMenu['below']) ? "class='b-secondary'" : '' ?>><?php print $belowMenu['link']['link_title'] ?></a>
                      <?php if (!empty($belowMenu['below'])) { ?>
                        <ul>
                          <?php foreach ($belowMenu['below'] as $belowMenu1) {
                            if ($belowMenu1['link']['hidden'] != 1) { ?>
                              <li>
                                <a href="<?php print url($belowMenu1['link']['href'], $belowMenu1['link']['localized_options']) ?>"
                                  <?= !empty($belowMenu1['below']) ? "class='b-secondary'" : '' ?>><?php print $belowMenu1['link']['link_title'] ?></a>
                                <?php if (!empty($belowMenu1['below'])) { ?>
                                  <ul>
                                    <?php foreach ($belowMenu1['below'] as $belowMenu2) {
                                      if ($belowMenu2['link']['hidden'] != 1) { ?>
                                        <li>
                                          <a href="<?php print url($belowMenu2['link']['href'], $belowMenu2['link']['localized_options']) ?>"
                                            <?= !empty($belowMenu2['below']) ? "class='b-secondary'" : '' ?>><?php print $belowMenu2['link']['link_title'] ?></a>
                                        </li>
                                      <?php }
                                    } ?>
                                  </ul>
                                  <?php
                                } ?>
                              </li>
                            <?php }
                          } ?>
                        </ul>
                        <?php
                      } ?>
                    </li>
                  <?php }
                } ?>
              </ul>
              <?php
            } ?>
          </li>
          <?php
        }
      }
    } ?>
  </ul>
</nav>